import http from '@/libs/http'

/**
 * 添加数据
 * @param data
 */
export function createdSpecValue(data) {
    return http({
        url: '/mall/goods/spec/value/add',
        method: 'post',
        data
    })
}

/**
 * 根据ID删除数据(批量删除)
 * 发送复杂请求（DELETE）时设置withCredentials为true报错
 * @param data：{"idList": ["1","2"]}
 */
export function deletedSpecValue(data) {
    return http({
        url: '/mall/goods/spec/value/delete',
        method: 'post',
        data
    })
}

/**
 * 修改数据
 * @param data
 */
export function updatedSpecValue(data) {
    return http({
        url: '/mall/goods/spec/value/update',
        method: 'post',
        data
    })
}

/**
 * 根据IdD查询单条数据
 * @param id
 */
export function selectOneSpecValue(id) {
    return http({
        url: '/mall/goods/spec/value/get/'+id,
        method: 'get'
    })
}

/**
 * 多条件查询数据列表
 * @param query
 */
export function selectListSpecValue(query) {
    return http({
        url: '/mall/goods/spec/value/list',
        method: 'get',
        params: query
    })
}

/**
 * 多条件查询分页数据
 * @param query
 */
export function selectPageSpecValue(query) {
    return http({
        url: '/mall/goods/spec/value/page',
        method: 'get',
        params: query
    })
}

